<%--=========================================================================== 
Flight choice 
===========================================================================--%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="Cp1251"%>
<%@ taglib uri="/WEB-INF/st4" prefix="st"%>

<form action="controller" method="get">
<c:if test="${param.type=='1'}">
<input type="hidden" name="command" value="directFlightChoice" />
</c:if>
<c:if test="${param.type=='2'}">
<input type="hidden" name="command" value="returnFlightChoice" />
</c:if>
<input type="hidden" name="type" value="${param.type}" />

	<table class="table">
		<tr class="title">
			<td><st:i18n key="pages.flight"/></td>
			<td><st:i18n key="pages.date"/></td>
			<td><st:i18n key="pages.time"/></td>
			<td><st:i18n key="pages.plane"/></td>
			<td><st:i18n key="pages.price"/></td>
			<td><st:i18n key="pages.choose"/></td>
		</tr>
		<c:forEach var="item" items="${flights}">
			<tr class="<c:out value="${item.style}" />">
				<td><c:out value="${item.flightName}" /></td>
				<td><c:out value="${item.date}" /></td>
				<td><c:out value="${item.time}" /></td>
				<td><c:out value="${item.plane}" /></td>
				<td><c:out value="${item.initialPrice}" /></td>
				<td><input type="radio" name="choice"
					value="<c:out value="${item.id}"/>" /></td>
			</tr>
		</c:forEach>
		
	</table>
	<br/>
	<input type="submit" value="<st:i18n key="button.next"/>" />
</form>